{% extends 'layouts/form_template_qn.html' %}

{% block submit_url %}
    {% url 'answer' instance_id criterion_id %}
{% endblock submit_url %}

{% block page_desc %}
{{ criterion_desc }}
{% endblock page_desc  %}

{% block form_body %}
    {% csrf_token %}
    {% for field in form %}
        <label for="{{ field.id_for_label }}">请对{{ field.label }}打分：</label>
        <div class="mb-3">
            <input type="range" name="{{ field.html_name }}" placeholder="评分" class="form-control" min="0" max="10" step="0.01" required id="{{ field.id_for_label }}">
        </div>
        <span class="text-error">{{ field.errors }}</span>
    {% endfor %}

    <div class="text-center">
    {% if user_type == "Respondent" %}
        <button type="submit" name="create_answer" class="btn bg-gradient-info w-100 mt-4 mb-0">
            Submit
        </button>
    {% endif %}
    </div>
{% endblock form_body %}